package com.example.chapter2.student.Service.impl;

import com.example.chapter2.student.Service.StudentService;
import com.example.chapter2.student.dao.StudentDao;
import com.example.chapter2.student.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao studentDao;
    @Override
    public Student selectById(long id){
        return studentDao.selectById(id);

    }
    @Override
    public int insert(Student student){
        return studentDao.insert(student);
    }
    @Override
    public int deleteById(long id){
        return studentDao.deleteById(id);

    };
    @Override
    public int updataById(Student student){
        return studentDao.updateById(student);
    }
}
